<%--
  Created by IntelliJ IDEA.
  User: ZJM
  Date: 2024/4/16
  Time: 23:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <title>JSP四大域对象</title>
</head>
<body>
<h1>页面1</h1>
<a href="/pages/jsp07.jsp">跳转到页面2</a>
<%
  pageContext.setAttribute("key", "pageContext");
  request.setAttribute("key", "request");
  session.setAttribute("key", "session");
  application.setAttribute("key", "application");
%>

<%
  System.out.println("pageContext" + pageContext.getAttribute("key"));
  System.out.println("request" + request.getAttribute("key"));
  System.out.println("session" + session.getAttribute("key"));
  System.out.println("application" + application.getAttribute("key"));
%>
</body>
</html>
